<?php

class login extends page
{	  
	var $body_tpl = "page_templates/login.tpl";
	
  	
	function page_do()
	{
		parent::page_do();
		   		   
		if (@$_REQUEST['submit'] == 'Login')
		{
			if ($this->app->sess->login($_REQUEST['username'], $_REQUEST['password']))
			{
				header("Location: index.php");
			}
			else
			{
				$_REQUEST['failed_login'] = 1;
				@$this->body->assign_var('MSG', "<font color=red>Login Failed</font><br>");
			}
		}
				
	}	  
}

?>